function sayName(name) {
  console.log(name);
}

function sum(a, b) {
  return a + b;
}

function sayHi() {
  console.log("Hi");
}

function callSum1(a, b) {
  return sum.apply(this, arguments);
}

function callSum2(a, b) {
  return sum.apply(this, [a, b]);
}

function callSum(a, b) {
  return sum.call(this, a, b);
}
console.log(sayName.length);
console.log(sum.length);
console.log(sayHi.length);
console.log(sayName.prototype);

console.log(callSum1(10, 2));
console.log(callSum2(10, 2));

console.log(callSum(10, 2));

const sum3 = (a, b) => {
  console.log(this);
  return a + b;
};

console.log(sum3.call(this, 10, 2));
